<extend name="work/base_mini"/>
<block name="content">
    <link rel="stylesheet" href="https://cdn.weibuyun.com/static/admin/editor/css/editormd.min.css" />
    <script src="https://cdn.weibuyun.com/static/admin/editor/examples/js/jquery.min.js"></script>
    <script src="https://cdn.weibuyun.com/static/admin/editor/lib/marked.min.js"></script>
    <script src="https://cdn.weibuyun.com/static/admin/editor/lib/prettify.min.js"></script>
    <script src="https://cdn.weibuyun.com/static/admin/editor/lib/raphael.min.js"></script>
    <script src="https://cdn.weibuyun.com/static/admin/editor/lib/underscore.min.js"></script>
    <script src="https://cdn.weibuyun.com/static/admin/editor/lib/sequence-diagram.min.js"></script>
    <script src="https://cdn.weibuyun.com/static/admin/editor/lib/flowchart.min.js"></script>
    <script src="https://cdn.weibuyun.com/static/admin/editor/lib/jquery.flowchart.min.js"></script>
    <script src="https://cdn.weibuyun.com/static/admin/editor/editormd.min.js"></script>
    <div style="background: #fff">
        <div style="padding-left: 20px;padding-right: 20px;">
            <div id="infotitle">
                <textarea style="display:none;">###{$info.title|default=''}</textarea>
            </div>
            <div id="viewinfo">
                <textarea style="display:none;">{$info.info|raw|default=""}</textarea>
            </div>
            <br>
            <span class="c_time">{$info.c_time}</span>
            <span id="file_path" style="cursor:pointer;padding-left: 20px;padding-right: 20px;"> {$info.file_path|default=''}</span>

        </div>
    </div>
    <style>
        .task-list-item-checkbox{
            display: inline !important;
        }
        .editormd-code-toolbar select{
            display: inline !important;
        }
        .c_time{
            float: right;
            margin: 5px;
            bottom:5px;
        }
        body{
            background: #fff
        }
        #infotitle{
            text-align: center;
        }
    </style>
</block>
<block name="script">
    <script charset="utf-8" src="https://unpkg.com/qiniu-js@2.5.4/dist/qiniu.min.js"></script>
    <script type="text/javascript">
        layui.use(['element', 'table', 'form', 'formSelects', 'laypage'], function () {
            var table = layui.table
                , form = layui.form
                ,$=layui.$
                , laypage = layui.laypage
                , element = layui.element
                , formSelects = layui.formSelects
                , content = 0
                , count = 0;
            var testView = editormd.markdownToHTML("viewinfo", {
                // markdown : "[TOC]\n### Hello world!\n## Heading 2", // Also, you can dynamic set Markdown text
                toc:true,
                tocm:true,
                tocDropdown:true,
                htmlDecode : true,
                //markdown: "",
                autoLoadModules : true,
                flowChart: true,             // 开启流程图支持，默认关闭
                sequenceDiagram: true,       // 开启时序/序列图支持，默认关闭,
                emoji: true,
                taskList: true,          // Enable Github Flavored Markdown task lists
                htmlDecode : true,  // Enable / disable HTML tag encode.
                // htmlDecode : "style,script,iframe",  // Note: If enabled, you should filter some dangerous HTML tags for website security.
            });
            var testView2 = editormd.markdownToHTML("infotitle", {
            });
            $('#file_path').click(function () {
                if ($('#file_path').html()) {
                    window.open($('#file_path').html());
                }
            });

        });
    </script>
</block>